package api

import (
	"github.com/gin-gonic/gin"
	"live-broadcast_07_22/api/handler"
)

func LoadRouter(r *gin.Engine) {

	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			user.POST("register", handler.RegisterUser)
			user.POST("login", handler.LoginUser)
		}

		auth := api.Group("/auth")
		{
			auth.POST("upload", handler.Upload)
			auth.POST("deleteUpload", handler.DeleteUpload)
			auth.GET("getUploadNum", handler.GetUploadNum)
			auth.GET("listUpload", handler.ListUpload)
			auth.GET("ShowUpload", handler.ShowUpload)
		}

	}

}
